#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<functional>

using namespace std;

long long minimumFuelCost(vector<vector<int>>& roads, int seats) {
    int n = roads.size();
    vector<vector<int>> g(n + 1);
    for (auto& e : roads)
    {
        g[e[0]].push_back(e[1]);
        g[e[1]].push_back(e[0]);
    }

    long long res = 0;
    function<int(int, int)> dfs = [&](int cur, int prev) {
        int sum = 1;
        for (auto ne : g[cur])
            if (ne != prev)
            {
                int cnt = dfs(ne, cur);
                sum += cnt;
                res += (cnt + seats - 1) / seats;
            }
        return sum;
    };

    dfs(0, -1);
    return res;
}

int main()
{
	return 0;
}